<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			var password="zhangsan123456";
			var UserName="张三";
			var VerificationCode=Math.floor(Math.random()*9000)+1000;
			var inpuUserName=prompt("请输入用户名:");
			if(inpuUserName==UserName){
				var inputpassword=prompt("请输入密码:");
				if(inputpassword==password){
					var inputVerificationCode=prompt("请输入验证码:"+VerificationCode);
					if(inputVerificationCode==VerificationCode){
						alert("登录成功");
					}else{
						alert("请输入正确的验证码");
					}
				}else{
					alert("请输入正确的密码!");
				}
			}else{
				alert("请输入正确的用户名!");
			}
		</script>
	</body>
</html>
